<?php
$cid        = gpc_getStringArray('cid');
$name       = "";

if(count($cid)==0)
{
    $cid[0]=$id;
}

foreach($cid as $id)
{
    //---------------Lay thong tin ve tour sap xoa
    $sql_select = "SELECT cName,iParentId FROM tblsettour WHERE iId = '$id'";
    $rs=$dbsql->query($sql_select);
    if($result = $dbsql->fetch_array($rs))
    {
    	$name          .= $result["cName"].', ';
        $idparent      = $result['iParentId'];
    }

    DelTour($id);
    DelTourElmByTourId($id);
    DelTourTabByTourId($id);
}

Insert_Tracking("Del tour: $name");

$pagetr = empty($pagetr) ? "id=$idparent" : $pagetr;
page_transfer("Delete Tour Success",$pagetr);
exit();
?>